import request from '/@/utils/request';

/**
 * 角色api接口集合
 * @method signIn 用户登录
 * @method signOut 用户退出登录
 */
export function useRoleApi() {
	return {
		getRole: (data: object) => {
			return request({
				url: '/api/admin/get_role' ,
				method: 'post',
				data
			});
		},
		getAllRole: (params?: object) => {
			return request({
				url: '/api/admin/get_all_role' ,
				method: 'get',
				params
			});
		},
		addRole: (data: object) => {
			return request({
				url: '/api/admin/add_role',
				method: 'post',
				data
			});
		},
		editRole: (data: object) => {
			return request({
				url: '/api/admin/edit_role',
				method: 'post',
				data
			});
		},
		delRole: (data: object) => {
			return request({
				url: '/api/admin/del_role',
				method: 'post',
				data
			});
		},
	};
}
